<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.prg</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Clipper) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;">// Test file to test kate's clipper highlighting</span>
<span style="color:#7a7c7d;">// </span><span style="color:#3f8058;">kate:</span><span style="color:#7a7c7d;"> </span><span style="color:#7f8c8d;">hl</span><span style="color:#f44f4f;"> Clipper</span><span style="color:#7f8c8d;">;</span>

<span style="color:#2980b9;background-color:#153042;">//BEGIN INCLUDES</span>
<span style="color:#27ae60;">#include </span><span style="color:#27ae60;">&lt;clip-ui.ch&gt;</span>
<span style="color:#27ae60;">#include </span><span style="color:#27ae60;">&quot;logo.ch&quot;</span>

<span style="color:#27ae60;">#define PRGVERSION	</span><span style="color:#27ae60;">&quot;0.0.1&quot;</span>
<span style="color:#2980b9;background-color:#153042;">//END</span>

<span style="color:#2980b9;background-color:#153042;">//BEGIN CODE</span>
<span style="font-weight:bold;">static</span> ws, win
<span style="font-weight:bold;">static</span> driver := getDriver()
<span style="color:#7a7c7d;">/* a multiline</span>
<span style="color:#7a7c7d;">     comment</span>
<span style="color:#7a7c7d;">*/</span>

<span style="font-weight:bold;">function</span> main( formName )
	<span style="font-weight:bold;">local</span> <span style="color:#2980b9;">form</span>
	<span style="font-weight:bold;">local</span> fileName

	<span style="font-weight:bold;">if</span> <span style="color:#8e44ad;">empty</span>(formName)
		<span style="color:#2980b9;">??</span> <span style="color:#f44f4f;">&quot;Usage: ./form_ui &lt;form.xfl&gt;&amp;</span><span style="color:#3daee9;">\n</span><span style="color:#f44f4f;">&quot;</span>
		CANCEL
	<span style="font-weight:bold;">else</span>
		fileName := formName
	<span style="font-weight:bold;">endif</span>
	ws  := UIWorkSpace()

	<span style="color:#2980b9;">form</span> := UIForm( fileName )
	win  := <span style="color:#2980b9;">form</span>:parseFile()
<span style="color:#7a7c7d;">//	?? valtype(win),chr(10)</span>
	<span style="font-weight:bold;">if</span> win == <span style="font-weight:bold;">NIL</span>
		CANCEL
	<span style="font-weight:bold;">endif</span>
	win:show()

	ws:<span style="color:#2980b9;">run</span>()
	ws:<span style="color:#2980b9;">quit</span>()
<span style="font-weight:bold;">return</span> 0

<span style="color:#7a7c7d;">/* Setting dialog */</span>
<span style="font-weight:bold;">function</span> settingsDialog()
	<span style="color:#2980b9;">??</span> <span style="color:#f44f4f;">&quot;TODO: Settings dialog&amp;</span><span style="color:#3daee9;">\n</span><span style="color:#f44f4f;">&quot;</span>
<span style="font-weight:bold;">return</span>

<span style="color:#7a7c7d;">/* About dialog */</span>
<span style="font-weight:bold;">function</span> aboutDialog()
	<span style="font-weight:bold;">local</span> dlg := UIWindow(<span style="color:#f44f4f;">&quot;About&quot;</span>, win, <span style="color:#f44f4f;">&quot;aboutDlg&quot;</span>, <span style="font-weight:bold;">.F.</span>)
	<span style="font-weight:bold;">local</span> hl, lside, t, bb, bD

	hl  := UIHBox(,4,8)
	lside := UIVBox()
	lside:add(UIImage(eas_logo_mini,<span style="font-weight:bold;">.T.</span>))
	hl:add(lside,<span style="font-weight:bold;">.F.</span>,<span style="font-weight:bold;">.F.</span>)
	dlg:userSpace:add(hl,<span style="font-weight:bold;">.T.</span>,<span style="font-weight:bold;">.T.</span>)
	t   := UIVBox()
	hl:add(t,<span style="font-weight:bold;">.T.</span>,<span style="font-weight:bold;">.T.</span>)

	t:add(UILabel(<span style="color:#f44f4f;">&quot;License: GPL version 2 or later&quot;</span>))
	bb  := UIButtonBar()
	t:add(bb)
	bD := UIButton(win, <span style="color:#f44f4f;">&quot;&amp;Close&quot;</span>, <span style="color:#27ae60;">{|o,e| dlg:close() }</span> )
	bb:add( bD )

	dlg:setFocus(bD)
	dlg:setDefault(bD)
	dlg:setPlacement( <span style="font-weight:bold;">.T.</span> )
	dlg:show()
<span style="font-weight:bold;">return</span>
<span style="color:#2980b9;background-color:#153042;">//END</span>
</pre></body></html>
